package com.moorror.cola.strategy.plugin.view.component;

import com.intellij.openapi.actionSystem.ActionToolbar;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.SimpleToolWindowPanel;
import com.intellij.openapi.wm.ToolWindow;
import com.moorror.cola.strategy.plugin.utils.ProjectServiceUtils;

/**
 * @Author jiyanghuang
 * @Date 2022/3/14 12:01 AM
 */
public class CSPanel extends SimpleToolWindowPanel {
    protected Project project;
    private ToolWindow toolWindow;

    public CSPanel(Project project, ToolWindow toolWindow) {
        super(true);
        this.project = project;
        this.toolWindow = toolWindow;
        CSActionToolbar bdefActionToolbar = ProjectServiceUtils.instance(project, CSActionToolbar.class);
        ActionToolbar actionToolbar = bdefActionToolbar.getToolbar();
        setToolbar(actionToolbar.getComponent());
        actionToolbar.setTargetComponent(this);
//        setContent(this.bdefTabBar);
    }

    public void setProject(Project project) {
        this.project = project;
    }

    public Project getProject() {
        return project;
    }
}
